<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>智慧考务</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta name=”apple-mobile-web-app-status-bar-style” content=”default” />
    <meta name=”apple-mobile-web-app-status-bar-style” content=”black” />
    <meta name=”apple-mobile-web-app-status-bar-style” content=”black-translucent” />
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <meta name="format-detection" content="telephone=no"/>

    <link href="${s.base}/mobile/css/weui.min.css" rel="stylesheet" />
    <link href="${s.base}/mobile/css/jquery-weui.css" rel="stylesheet" />
    <link href="${s.base}/mobile/css/zhkw.css" rel="stylesheet">
    <script type="text/javascript" src="${s.base}/mobile/js/fontSize.js"></script>

</head>
<body>

<!--<div class="main-ctn">-->
    <!--<div class="society-ctn clearfix" id="tab-society">-->
        <!--<ul id="society-list">-->

        <!--</ul>-->
    <!--</div>-->
<!--</div>-->


<div class="main-content75">
    <div class="exam-details-list">
        <ul id="my-society-list">
        </ul>
    </div>

</div>
<div class="nodate-ctn" style="display: none">
    <p>
        <img src="${s.base}/mobile/images/nodates.png"><br>
        <span>暂无数据</span>
    </p>
</div>

</body>
<script type="text/javascript" src="${s.base}/mobile/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/fontSize.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/jquery-weui.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/fastclick.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/common.js"></script>
<script type="text/javascript">
    var applyId = '${applyId}';
    var token = '${token}';
    var type = '${type}';
    $(function(){
        initMySocietyData();
    })

    function initMySocietyData() {
        $.fn.doPost('/phone/kwmanagement/getTeacherKwList', {applyId:applyId,token:token,type:type}, function (result) {
            if (result.code === 0) {
                postMySocietyData(result.data);
            } else {
                $.toast('获取数据失败', "text");
            }
        });

    }
    function postMySocietyData(data) {
        var str = '';
        if (data != null && data.length > 0) {
            for (var i = 0; i < data.length; i++) {
                var e = data[i];
                var timeStr = e.time+"考务信息";
                var newdatas =data[i].list;
                str += '<li class="zk">'+
                    ' <i class="cyfont">&#xe6aa;</i>'+
                    ' <h1>'+timeStr+'</h1>'+
                    '<div class="kw-subject-ctn">';
                for (var j = 0; j < newdatas.length; j++) {
                    var newe = newdatas[j];
                    var Str = newe.beginTime.substring(0,16)+"-"+newe.endTime.substring(11,16);

                    str += ' <div class="kw-subject-line">'+
                        '<div class="kw-subject-name blue-bg1">'+newe.kmmc+'</div>'+
                        '<div class="div-line-txt">考试时间：<span>'+Str+'</span></div>'+
                        '<div class="div-line-txt">考场号：<span>'+newe.kcNum+'</span></div>'+
                        '<div class="div-line-txt">考场地点：<span>'+newe.kcPlace+'</span></div>'+
                        '<div class="div-line-txt">监考老师：<span>'+newe.jkName+'</span></div>'+
                        '<div class="div-line-txt">巡考老师：<span>'+newe.xkName+'</span></div>'+
                        '</div>';
                }
                str +=  '</div>'+
                     '</li>';

            }
            $('#nodate-ctn').hide();
        }
        if (isBlank(str)) {
            $('#nodate-ctn').show();
            $('#my-society-list').html(str);
        } else {
            $('#my-society-list').html(str);
        }
        $(".exam-details-list ul li").bind("click",function(){
            $(this).find(".kw-subject-ctn").slideToggle();
            $(this).toggleClass("zk");
            if(!$(this).hasClass("zk")){
                $(this).find("i").html("&#xeb0f;")
            }
            else{
                $(this).find("i").html("&#xe6aa;")
            }
        })
    }

</script>
</html>
